package com.acwing.partition9;

import java.io.*;

/**
 * @author `RKC`
 * @date 2021/12/23 9:03
 */
public class AC841字符串哈希 {

    //素数的选择一般是131、13331，或者其它更大的素数
    private static final int prime = 13331;
    private static long[] prefix;
    private static long[] hash;

    private static final BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    private static final BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(System.out));

    public static void main(String[] args) throws IOException {
        String[] s = reader.readLine().split("\\s+");
        int n = Integer.parseInt(s[0]), q = Integer.parseInt(s[1]);
        String str = reader.readLine();
        hash(str);
        while (q-- > 0) {
            s = reader.readLine().split("\\s+");
            int a = Integer.parseInt(s[0]), b = Integer.parseInt(s[1]), c = Integer.parseInt(s[2]), d = Integer.parseInt(s[3]);
            long h1 = substringHash(a, b), h2 = substringHash(c, d);
            if (h1 == h2) writer.write("Yes\n");
            else writer.write("No\n");
        }
        writer.flush();
    }

    private static long substringHash(int a, int b) {
        if (a > b) return 0;
        return hash[b] - hash[a - 1] * prefix[b - a + 1];
    }

    private static long hash(String str) {
        int n = str.length();
        hash = new long[n + 1];
        prefix = new long[n + 1];
        prefix[0] = 1;
        for (int i = 1; i <= n; i++) {
            prefix[i] = prefix[i - 1] * prime;
            hash[i] = hash[i - 1] * prime + str.charAt(i - 1);
        }
        return hash[n];
    }
}
